<form action="companies.php" method="post" id = "search">
    <?php
    if(!get_magic_quotes_gpc())
    {
        $searchterm_cname = addslashes($searchterm_cname);
        $searchterm_cdesc = addslashes($searchterm_cdesc);
        $searchterm_cloc = addslashes($searchterm_cloc);
    }

    if (mysqli_connect_error())
    {
        echo 'Error: could not connect to database. Please try again later.';
        exit;
    }
    ?>
    <label>Company Name</label>
    <input id="searchterm_cname" class="search_input" type="text" name="searchterm_cname">
    <label>Company Type</label>
    <input id="searchterm_cdesc" class="search_input" type="text" name="searchterm_cdesc">
    <label>Company Location</label>
    <input id="searchterm_cloc" class="search_input" type="text" name="searchterm_cloc">
      <br/>
    <input type="submit" value="Search" id="search_btn">
</form>